package com.example.avatar;

import java.util.LinkedList;

public class person {

	private LinkedList<Integer> body = new LinkedList<Integer>();
	private LinkedList<Integer> head = new LinkedList<Integer>();
	private LinkedList<Integer> legs = new LinkedList<Integer>();
	private int bodyPos;
	private int headPos;
	private int legsPos;
	
	public person()
	{
		body.add(R.drawable.bbody);
		body.add(R.drawable.gbody);
		body.add(R.drawable.ybody);
		body.add(R.drawable.rbody);
		bodyPos =0;
		
		head.add(R.drawable.bhead);
		head.add(R.drawable.ghead);
		head.add(R.drawable.yhead);
		head.add(R.drawable.rhead);
		headPos = 0;
		
		legs.add(R.drawable.blegs);
		legs.add(R.drawable.glegs);
		legs.add(R.drawable.ylegs);
		legs.add(R.drawable.rlegs);
		legsPos = 0;
		
		
	}
	
	
	public int moveBodyUp()
	{
		if(bodyPos < (body.size()-1))
		{
			bodyPos++;
		}
		
		return body.get(bodyPos);
	}
	
	public int moveBodydown()
	{
		if(bodyPos > 0)
		{
			bodyPos--;
		}
		
		return body.get(bodyPos);
	}
	
	public int moveHeadUp()
	{
		if(headPos < (head.size()-1))
		{
			headPos++;
		}
		
		return head.get(headPos);
	}
	
	public int moveHeadDown()
	{
		if(headPos > 0)
		{
			headPos--;
		}
		
		return head.get(headPos);
	}
	
	public int moveLegsUp()
	{
		if(legsPos < (legs.size()-1))
		{
			legsPos++;
		}
		
		return legs.get(legsPos);
	}
	
	public int moveLegsDown()
	{
		if(legsPos > 0)
		{
			legsPos--;
		}
		
		return legs.get(legsPos);
	}
}
